package cn.lyq.card.utils;

import android.view.View;

import androidx.annotation.NonNull;

import com.youth.banner.transformer.BasePageTransformer;
import com.youth.banner.util.LogUtils;

public class RotateYPageTransformer extends BasePageTransformer {
	private static final float DEFAULT_MAX_ROTATE = 20.0f;
	private float mMaxRotate = DEFAULT_MAX_ROTATE;

	public RotateYPageTransformer() {
	}

	public RotateYPageTransformer(float maxRotate) {
		mMaxRotate = maxRotate;
	}

	@Override
	public void transformPage(@NonNull View view, float position) {
		view.setRotationY(mMaxRotate * position);
	}
}
